Skip to content

Add missing endpoints#65

Open
IgorDobryn wants to merge 6 commits intomainfrom
MT-21859-python-sdk-add-webhooks-api-tokens-and-sub-accounts-endpoints
Open

Add missing endpoints#65
IgorDobryn wants to merge 6 commits intomainfrom
MT-21859-python-sdk-add-webhooks-api-tokens-and-sub-accounts-endpoints

Conversation

@IgorDobryn
Copy link
Copy Markdown

Motivation

Changes

API Tokens

  • GET /api/accounts/{account_id}/api_tokens — List API tokens
  • POST /api/accounts/{account_id}/api_tokens — Create API token
  • GET /api/accounts/{account_id}/api_tokens/{id} — Get API token
  • DELETE /api/accounts/{account_id}/api_tokens/{id} — Delete API token
  • POST /api/accounts/{account_id}/api_tokens/{id}/reset — Reset API token

Sub-Accounts (Organizations)

  • GET /api/organizations/{organization_id}/sub_accounts — Get organization sub accounts
  • POST /api/organizations/{organization_id}/sub_accounts — Create organization sub account

Webhooks

  • POST /api/accounts/{account_id}/webhooks — Create a webhook
  • GET /api/accounts/{account_id}/webhooks — List webhooks
  • GET /api/accounts/{account_id}/webhooks/{webhook_id} — Get a webhook
  • PATCH /api/accounts/{account_id}/webhooks/{webhook_id} — Update a webhook
  • DELETE /api/accounts/{account_id}/webhooks/{webhook_id} — Delete a webhook

@IgorDobryn IgorDobryn marked this pull request as draft April 30, 2026 13:32
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Warning

Rate limit exceeded

@IgorDobryn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 50 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 07be6c50-bb99-4133-b016-8139a00985f9

📥 Commits

Reviewing files that changed from the base of the PR and between fb76361 and bf0186c.

📒 Files selected for processing (25)
  • .envrc
  • .tool-versions
  • README.md
  • examples/general/api_tokens.py
  • examples/organizations/__init__.py
  • examples/organizations/sub_accounts.py
  • examples/webhooks/__init__.py
  • examples/webhooks/webhooks.py
  • mailtrap/__init__.py
  • mailtrap/api/general.py
  • mailtrap/api/organizations.py
  • mailtrap/api/resources/api_tokens.py
  • mailtrap/api/resources/sub_accounts.py
  • mailtrap/api/resources/webhooks.py
  • mailtrap/api/webhooks.py
  • mailtrap/client.py
  • mailtrap/models/api_tokens.py
  • mailtrap/models/organizations.py
  • mailtrap/models/webhooks.py
  • tests/unit/api/general/test_api_tokens.py
  • tests/unit/api/organizations/__init__.py
  • tests/unit/api/organizations/test_sub_accounts.py
  • tests/unit/api/webhooks/__init__.py
  • tests/unit/api/webhooks/test_webhooks.py
  • tests/unit/test_client.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch MT-21859-python-sdk-add-webhooks-api-tokens-and-sub-accounts-endpoints

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 8 minutes and 50 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@IgorDobryn IgorDobryn force-pushed the MT-21859-python-sdk-add-webhooks-api-tokens-and-sub-accounts-endpoints branch from f0dd9ee to 2e88bbc Compare May 1, 2026 06:49
@IgorDobryn IgorDobryn marked this pull request as ready for review May 4, 2026 12:59
@IgorDobryn IgorDobryn requested review from Ihor-Bilous and mklocek May 4, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants